package prometheussvc

import (
	"gluenet/internal/agent/depend"
	"gluenet/internal/agent/driver/rpcdriver"
	"gluenet/utils/rpc/labels"
)

var topic = rpcdriver.GenUrl(labels.ControlManager, labels.MetricsPush)

func (svc *Service) WriteMetric(data []byte) {
	if err := depend.Produce[rpcdriver.RpcDriver]().Push(topic, data); err != nil {
		svc.logger.Errorf("push msg to %s err: %s", topic, err)
	}
}
